package com.summer.main;

public class ExceptionTest {
	
	
	public static void main(String[] args) {
		System.out.println("kaishi");
		doAction();
		System.out.println("jieshu");
	}
	
	public static void doAction(){
		try{
			int data = getData();
			System.out.println("getData");
		}catch (NullPointerException e){
			System.out.println("NullPointerException");
		}catch (NumberFormatException e) {
			System.out.println("NumberFormatException");
		}
		System.out.println("doAction");
	}
	
	public static int getData() throws NumberFormatException{
		String str = null;
		str.length();
		Integer.valueOf(str);
		return 11;
	}
	

}
